<?php
/**
 * Single Product Image
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     1.6.4
 */

global $post, $woocommerce;

// Lấy danh sách hình thumbnail để gắn vào nivoslider

$attachments = get_posts( array(
    'post_type' 	=> 'attachment',
    'numberposts' 	=> -1,
    'post_status' 	=> null,
    'post_parent' 	=> $post->ID,
    'post_mime_type'=> 'image',
    'orderby'		=> 'menu_order',
    'order'			=> 'ASC'
) );

if ($attachments) {

    $loop = 0;

    foreach ( $attachments as $key => $attachment ) {

        if ( get_post_meta( $attachment->ID, '_woocommerce_exclude_image', true ) == 1 )
            continue;
        ?>
    <img class="fc_box2" rel="fc_group" data-thumb="<?php echo wp_get_attachment_url( $attachment->ID );?>" src="<?php 
        $temp = wp_get_attachment_image_src($attachment->ID, $size='full', $icon = false);
        echo $temp[0];
        ?>">
    <?php
        $loop++;
    }
}